package org.codeart.ioc.config;

import org.codeart.ioc.annotation.Bean;
import org.codeart.ioc.annotation.Component;
import org.codeart.ioc.pojo.User;

@Component
public class AppConfig {
    
    @Bean
    public User user01() {
        User user = new User();
        user.setId(888);
        user.setName("特朗普");
        user.setAddress("华盛顿");
        return user;
    }
    
    @Bean("user02")
    public User user02() {
        User user = new User();
        user.setId(999);
        user.setName("马斯克");
        user.setAddress("特斯拉");
        return user;
    }

}
